package com.adcc.loadsheet.billing.mapper.mysql.chargerule;

import com.adcc.loadsheet.billing.entity.chargerule.BillingRuleEntity;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * 计费规则Mapper
 * Created by zhaoml on 2020-04-07.
 */
@Mapper
public interface BillingRuleEntityMapper {

    //根据条件获取计费规则
    List<BillingRuleEntity> select(Map<String, Object> map);

    //根据主键ID查询
    BillingRuleEntity selectByPrimaryKey(Integer billingRuleId);

    //根据规则简称查询对应实体
    BillingRuleEntity findByRuleAbbrev(String ruleAbbrev);

    //创建计费规则
    Integer insert(BillingRuleEntity record);

    //修改计费规则
    Integer update(BillingRuleEntity record);

    //删除计费规则
    int deleteByPrimaryKey(Integer billingRuleId);
}